<div
    bsModal
    #createOrEditModal="bs-modal"
    class="modal fade"
    tabindex="-1"
    role="dialog"
    aria-labelledby="createOrEditModal"
    aria-hidden="true"
    [config]="{ backdrop: 'static' }"
>
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <form
                *ngIf="active"
                #editForm="ngForm"
                novalidate
                (ngSubmit)="save()"
                autocomplete="off"
            >
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span>车位续费: {{ placeName }}</span>
                    </h4>
                    <button
                        type="button"
                        class="close"
                        (click)="close()"
                        [attr.aria-label]="l('Close')"
                    >
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <label for="equipName">付款类型 *</label>
                        <div class="row" style="margin: 0">
                            <div class="col-md-12" style="padding-left: 0">
                                <select
                                    #toolTypeCombobox
                                    name="toolType"
                                    class="form-control"
                                    [(ngModel)]="payType"
                                    [attr.data-live-search]="true"
                                    jq-plugin="selectpicker"
                                    required
                                    minlength="1"
                                    (change)="changePayType()"
                                >
                                    <option value="0">{{ emptyText }}</option>
                                    <option
                                        *ngFor="let payType of payTypes"
                                        [value]="payType.displayText"
                                    >
                                        {{ payType.displayText }}
                                    </option>
                                </select>
                            </div>

                            <div class="col-md-12" style="padding-left: 0">
                                <label for="payvalue">金额 *</label>
                                <input
                                    id="payvalue"
                                    #displayNameInput="ngModel"
                                    type="text"
                                    name="payvalue"
                                    class="form-control"
                                    [(ngModel)]="payvalue"
                                    disabled
                                />
                                <validation-messages
                                    [formCtrl]="displayNameInput"
                                ></validation-messages>
                            </div>
                            <div class="col-md-12" style="padding-left: 0">
                                <label>截止日期</label>
                                <input
                                    type="text"
                                    class="form-control"
                                    name = "newEndTime"
                                    [ngModel]="newEndTime"
                                    disabled
                                />
                                <validation-messages
                                    [formCtrl]="displayNameInput"
                                ></validation-messages>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button
                        [disabled]="saving"
                        type="button"
                        class="btn btn-default"
                        (click)="close()"
                    >
                        {{ l("Cancel") }}
                    </button>
                    <button
                        type="submit"
                        class="btn btn-primary"
                        [disabled]="!editForm.form.valid"
                        [buttonBusy]="saving"
                        [busyText]="l('SavingWithThreeDot')"
                    >
                        <i class="fa fa-save"></i> <span>{{ l("Save") }}</span>
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
